package com.bling.common.bean;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 用户详细信息
 * @author BLingSoft
 *
 */

@Entity
@Table(name="T_USERDETAIL")
public class UserDetail implements Serializable {

	private static final long serialVersionUID = 8394904965893331140L;

	private Integer id;//主键
	private Integer userbasicid;//所属用户基本信息编号
	private Integer type;//用户类型 1-个人  2-商家
	private String lastname;//姓氏
	private Integer sex;//性别 1-女 2-男
	private String phone;//手机号码
	private String tel;//电话号码
	private String qq;//qq号码
	private Integer areaid;//所属学校编号
	private Integer imageuserid;//图像编号
	
	private ImageUser imageuser;

	public UserDetail() {
		super();
	}

	public UserDetail(Integer userbasicid, Integer type, String lastname,
			Integer sex, String phone, String tel, String qq, Integer areaid,
			Integer imageuserid) {
		super();
		this.userbasicid = userbasicid;
		this.type = type;
		this.lastname = lastname;
		this.sex = sex;
		this.phone = phone;
		this.tel = tel;
		this.qq = qq;
		this.areaid = areaid;
		this.imageuserid = imageuserid;
	}

	@Id
	@GeneratedValue
	@Column
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column
	public Integer getUserbasicid() {
		return userbasicid;
	}

	public void setUserbasicid(Integer userbasicid) {
		this.userbasicid = userbasicid;
	}

	@Column
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(length=50)
	public String getLastname() {
		return lastname;
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}

	@Column
	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	@Column(length=20)
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(length=20)
	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	@Column(length=20)
	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	@Column
	public Integer getAreaid() {
		return areaid;
	}

	public void setAreaid(Integer areaid) {
		this.areaid = areaid;
	}

	@Column
	public Integer getImageuserid() {
		return imageuserid;
	}

	public void setImageuserid(Integer imageuserid) {
		this.imageuserid = imageuserid;
	}

	@Transient
	public ImageUser getImageuser() {
		return imageuser;
	}

	public void setImageuser(ImageUser imageuser) {
		this.imageuser = imageuser;
	}
}
